package com.example.demo.SpringLog.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/log2")
public class LogController2 {
    //使用注解获取日志
    @RequestMapping("/print")
    public String print(){
        System.out.println("sout打印日志");
        log.trace("logger trace");
        log.debug("logger debug");
        log.info("logger info");
        log.warn("logger warn");
        log.error("logger error");
        return "打印日志";

    }


}
